package beans;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import java.sql.Timestamp;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "log_paypackage")
public class LogPayPackage {
	private int id;// 日志id
	private Timestamp payTime;// 扣费时间
	private Courier courier;// 快递员
	private Branch branch;// 设备网点
	private Express express;// 快递网点
	private Package package1;// 扣费包裹
	private double money;// 扣费金额
	private int channel;// 扣费类型
	private String serialNum;// 流水号
	private String comment;// 备注
	private int status;// 状态
	private double balance;// 余额

	@GenericGenerator(name = "generator", strategy = "native")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "log_payPackage_id", unique = true, nullable = false)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Column(name = "log_payPackage_payTime")
	public Timestamp getPayTime() {
		return payTime;
	}

	public void setPayTime(Timestamp payTime) {
		this.payTime = payTime;
	}

	@ManyToOne
	@JoinColumn(name = "log_payPackage_userID")
	public Courier getCourier() {
		return courier;
	}

	public void setCourier(Courier courier) {
		this.courier = courier;
	}

	@ManyToOne
	@JoinColumn(name = "log_payPackage_branchID")
	public Branch getBranch() {
		return branch;
	}

	public void setBranch(Branch branch) {
		this.branch = branch;
	}

	@ManyToOne
	@JoinColumn(name = "log_payPackage_expressID")
	public Express getExpress() {
		return express;
	}

	public void setExpress(Express express) {
		this.express = express;
	}

	@ManyToOne
	@JoinColumn(name = "log_payPackage_packageID")
	public Package getPackage1() {
		return package1;
	}

	public void setPackage1(Package package1) {
		this.package1 = package1;
	}

	@Column(name = "log_payPackage_money")
	public double getMoney() {
		return money;
	}

	public void setMoney(double money) {
		this.money = money;
	}

	@Column(name = "log_payPackage_channel")
	public int getChannel() {
		return channel;
	}

	public void setChannel(int channel) {
		this.channel = channel;
	}

	@Column(name = "log_payPackage_serialNum")
	public String getSerialNum() {
		return serialNum;
	}

	public void setSerialNum(String serialNum) {
		this.serialNum = serialNum;
	}

	@Column(name = "log_payPackage_comment")
	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	@Column(name = "log_payPackage_status")
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	@Column(name = "log_payPackage_balance")
	public double getBalance() {
		return balance;
	}

	public void setBalance(double balance) {
		this.balance = balance;
	}
}
